// Lang_08 [static attributes].nova // The application class. class StaticAttributesApp { // Declare an integer static attribute. private static int i; // Application class's "main" function. public static void main( String[] args ) { // Assign an integer value to the static attribute. i = 10; // Double the value of the static attribute; i += i; // Output the value of the static attribute. Stream.writeLine( "i is a static attribute: " + Integer.toString( i ) ); //////////////////////////////////////// // Same again using the dot operator. // //////////////////////////////////////// // Assign an integer value to the static attribute. StaticAttributesApp.i = 32; // Double the value of the static attribute; StaticAttributesApp.i += StaticAttributesApp.i; // Output the value of the static attribute. Stream.writeLine( "StaticAttributesApp.i is a static attribute: " + Integer.toString( StaticAttributesApp.i ) ); } }